<%// Arquivo que verifica la seguridad de la interfaz %>
<%@page import="java.util.ArrayList"%>

<%
    String allowed = (String) request.getAttribute("allowed");
    ArrayList<String> roles = (ArrayList<String>) session.getAttribute("roles");
    if (roles == null || roles.size() <= 0) { %>
        <script type="text/javascript">
            loginMenu();
        </script>
    <% } else if(!roles.contains(allowed) && !roles.contains("Administrador")) {%>
            <jsp:forward page="../Templates/noPrivilegio.jsp"></jsp:forward>
    <% }
%>